<?php
include_once 'log_text.php';

function output($source, $ignore = false) {
  if ($source != null && ($ignore || !defined('NO_OUTPUT') || !NO_OUTPUT)) {
    $output = json_encode($source, JSON_UNESCAPED_UNICODE);
    echo $output;
    if (IS_DEBUG) {
      log_text($output);
    }
    // die();
  } else {
    log_text('DISMISSED OUTPUT');
  }
}
